package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface NursingProjectMapper {
    /**
     * 查询护理项目列表
     *
     * @param name
     * @param status
     * @return
     */
    Page<NursingProjectVo> findNursingProjectPage(String name, Integer status);

    /**
     * 新增护理项目
     * @param nursingProject
     */
    void addNursingProject(NursingProject nursingProject);

    /**
     * 根据id查询护理项目
     * @param id
     * @return
     */
    NursingProject findNursingProjectById(Long id);

    /**
     * 查询护理项目关联次数
     * @param id
     * @return
     */
    Integer findRefCount(Long id);

    /**
     * 修改护理项目
     * @param nursingProject
     */
    void updateNursingProject(NursingProject nursingProject);

    /**
     * 删除护理项目
     * @param id
     */
    void deleteNursingProject(Long id);

    /**
     * 禁用/启用护理项目
     * @param id
     * @param status
     */
    void updateNursingProjectByStatus(Long id, Integer status);

    /**
     * 查询所有护理项目
     * @return
     */
    List<NursingProjectVo> findAllNursingProject();
}
